package model;


public class Thinking implements PhilosopherState {
	
	private static Thinking instance;
	public synchronized static Thinking getInstance() {
		if(instance == null){
			instance = new Thinking();
		}
		return instance;
	}
	
	@Override
	public void accept(final PhilosopherStateVisitor visitor) {
		visitor.visit(this);
	}

	@Override
	public long getMaxWaitTime() {
		return PTOMonitor.getInstance().getMaxThinkingTime();
	}

	private Thinking() {}
	
	@Override
	public String toString(){
		return "thinking";
	}
}
